{{extend 'layout.html'}}
{{if  results:}}
 <table>
  <tr>
   <th></th>
   {{for c in columns:}}
    <th class="result">{{=c}}</th>
   {{pass}}
   <th class="result">Loaned</th>
  </tr>
   {{for r in results:}}
   <tr>
    <td>{{=A("View", _href=URL(r=request, f="show", args=r.id))}}</td>
    {{for c in columns:}}
     {{if names[c] in ['signed', 'antique']:}}
      <td class="result">
       {{if r[names[c]]:}}
       {{=XML('&#x2714;')}}
       {{pass}}
      </td>
     {{else:}}
      <td class="result">{{=r[names[c]]}}</td>
     {{pass}}
    {{pass}}
     <td class="result">
      {{if r.loans.select():}}
      {{=XML('&#x2714;')}}
      {{pass}}
     </td>
   </tr>
   {{pass}}
</table>
<p> </p>
<p> </p>
{{pass}}
{{=form}}
{{=A('Start new search', _href=URL(r=request, f='kwdsearch', args='new'))}}
